package com.kaka.bus.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class DrainProductBean implements Parcelable {

    /**
     * device : ios
     * directUrl : http://uhuishou.ronghezulin.com/banner/youhuishou/strategy.html
     * id : 15
     * isDelete : 2
     * product : {"amountDown":10,"amountUp":10000,"businessId":"1","creationDate":"2018-57-02 11:57:26","dayReat":"0.03","directUrl":"测试8","enable":"1","estimatedAmount":0,"flag":"0","headline":"测试88","id":89,"isSelf":"Y","marks":[{"id":"12","isDelete":"2","markDesc":"新口子,推荐,火爆","productId":"89"}],"payEnable":"0","period":10,"productIcon":"app/images/youtubaika@2x.png","productName":"测试88","range":"10~10000.00万","updateDate":"2018-01-02 12:01:13"}
     * productId : 89
     * status : 1
     * type : 3
     * url : http://uhuishou.ronghezulin.com/banner/banneruhuishou.jpg
     * creationTime : 2018-07-02 14:07:01
     */

    private String device;
    private String directUrl;
    private String id;
    private int isDelete;
    private String locationId;
    private ProductBean product;
    private String productId;
    private int status;
    private int type;
    private String url;
    private String creationTime;

    public String getLocationId() {
        return locationId;
    }

    public void setLocationId(String locationId) {
        this.locationId = locationId;
    }

    public String getDevice() {
        return device;
    }

    public void setDevice(String device) {
        this.device = device;
    }

    public String getDirectUrl() {
        return directUrl;
    }

    public void setDirectUrl(String directUrl) {
        this.directUrl = directUrl;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(int isDelete) {
        this.isDelete = isDelete;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(String creationTime) {
        this.creationTime = creationTime;
    }

    public static class ProductBean implements Parcelable {
        /**
         * amountDown : 10.0
         * amountUp : 10000.0
         * businessId : 1
         * creationDate : 2018-57-02 11:57:26
         * dayReat : 0.03
         * directUrl : 测试8
         * enable : 1
         * estimatedAmount : 0.0
         * flag : 0
         * headline : 测试88
         * id : 89
         * isSelf : Y
         * marks : [{"id":"12","isDelete":"2","markDesc":"新口子,推荐,火爆","productId":"89"}]
         * payEnable : 0
         * period : 10
         * productIcon : app/images/youtubaika@2x.png
         * productName : 测试88
         * range : 10~10000.00万
         * updateDate : 2018-01-02 12:01:13
         */

        private double amountDown;
        private double amountUp;
        private String businessId;
        private String applicationCondition;
        private String creationDate;
        private String dayReat;
        private String directUrl;
        private String enable;
        private double estimatedAmount;
        private String flag;
        private String headline;
        private String id;
        private String isSelf;
        private String payEnable;


        public String getUnit() {
            return unit;
        }

        public void setUnit(String unit) {
            this.unit = unit;
        }

        private String unit;
        private int period;
        private String periods;
        private String productIcon;
        private String productName;

        public String getPeriods() {
            return periods;
        }

        public void setPeriods(String periods) {
            this.periods = periods;
        }

        public String getApplicationCondition() {
            return applicationCondition;
        }

        public void setApplicationCondition(String applicationCondition) {
            this.applicationCondition = applicationCondition;
        }

        public String getAuditDesc() {
            return auditDesc;
        }

        public void setAuditDesc(String auditDesc) {
            this.auditDesc = auditDesc;
        }

        private String auditDesc;

        public String getApplyCount() {
            return applyCount;
        }

        public void setApplyCount(String applyCount) {
            this.applyCount = applyCount;
        }

        private String applyCount;

        public String getProductDescription() {
            return productDescription;
        }

        public void setProductDescription(String productDescription) {
            this.productDescription = productDescription;
        }

        private String productDescription;
        private String range;
        private String updateDate;
        private List<MarksBean> marks;

        public double getAmountDown() {
            return amountDown;
        }

        public void setAmountDown(double amountDown) {
            this.amountDown = amountDown;
        }

        public double getAmountUp() {
            return amountUp;
        }

        public void setAmountUp(double amountUp) {
            this.amountUp = amountUp;
        }

        public String getBusinessId() {
            return businessId;
        }

        public void setBusinessId(String businessId) {
            this.businessId = businessId;
        }

        public String getCreationDate() {
            return creationDate;
        }

        public void setCreationDate(String creationDate) {
            this.creationDate = creationDate;
        }

        public String getDayReat() {
            return dayReat;
        }

        public void setDayReat(String dayReat) {
            this.dayReat = dayReat;
        }

        public String getDirectUrl() {
            return directUrl;
        }

        public void setDirectUrl(String directUrl) {
            this.directUrl = directUrl;
        }

        public String getEnable() {
            return enable;
        }

        public void setEnable(String enable) {
            this.enable = enable;
        }

        public double getEstimatedAmount() {
            return estimatedAmount;
        }

        public void setEstimatedAmount(double estimatedAmount) {
            this.estimatedAmount = estimatedAmount;
        }

        public String getFlag() {
            return flag;
        }

        public void setFlag(String flag) {
            this.flag = flag;
        }

        public String getHeadline() {
            return headline;
        }

        public void setHeadline(String headline) {
            this.headline = headline;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getIsSelf() {
            return isSelf;
        }

        public void setIsSelf(String isSelf) {
            this.isSelf = isSelf;
        }

        public String getPayEnable() {
            return payEnable;
        }

        public void setPayEnable(String payEnable) {
            this.payEnable = payEnable;
        }

        public int getPeriod() {
            return period;
        }

        public void setPeriod(int period) {
            this.period = period;
        }

        public String getProductIcon() {
            return productIcon;
        }

        public void setProductIcon(String productIcon) {
            this.productIcon = productIcon;
        }

        public String getProductName() {
            return productName;
        }

        public void setProductName(String productName) {
            this.productName = productName;
        }

        public String getRange() {
            return range;
        }

        public void setRange(String range) {
            this.range = range;
        }

        public String getUpdateDate() {
            return updateDate;
        }

        public void setUpdateDate(String updateDate) {
            this.updateDate = updateDate;
        }

        public List<MarksBean> getMarks() {
            return marks;
        }

        public void setMarks(List<MarksBean> marks) {
            this.marks = marks;
        }

        public static class MarksBean implements Parcelable {
            /**
             * id : 12
             * isDelete : 2
             * markDesc : 新口子,推荐,火爆
             * productId : 89
             */

            private String id;
            private String isDelete;
            private String markDesc;
            private String productId;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getIsDelete() {
                return isDelete;
            }

            public void setIsDelete(String isDelete) {
                this.isDelete = isDelete;
            }

            public String getMarkDesc() {
                return markDesc;
            }

            public void setMarkDesc(String markDesc) {
                this.markDesc = markDesc;
            }

            public String getProductId() {
                return productId;
            }

            public void setProductId(String productId) {
                this.productId = productId;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.id);
                dest.writeString(this.isDelete);
                dest.writeString(this.markDesc);
                dest.writeString(this.productId);
            }

            public MarksBean() {
            }

            protected MarksBean(Parcel in) {
                this.id = in.readString();
                this.isDelete = in.readString();
                this.markDesc = in.readString();
                this.productId = in.readString();
            }

            public static final Creator<MarksBean> CREATOR = new Creator<MarksBean>() {
                @Override
                public MarksBean createFromParcel(Parcel source) {
                    return new MarksBean(source);
                }

                @Override
                public MarksBean[] newArray(int size) {
                    return new MarksBean[size];
                }
            };
        }

        public ProductBean() {
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeDouble(this.amountDown);
            dest.writeDouble(this.amountUp);
            dest.writeString(this.businessId);
            dest.writeString(this.applicationCondition);
            dest.writeString(this.creationDate);
            dest.writeString(this.dayReat);
            dest.writeString(this.directUrl);
            dest.writeString(this.enable);
            dest.writeDouble(this.estimatedAmount);
            dest.writeString(this.flag);
            dest.writeString(this.headline);
            dest.writeString(this.id);
            dest.writeString(this.isSelf);
            dest.writeString(this.payEnable);
            dest.writeString(this.unit);
            dest.writeInt(this.period);
            dest.writeString(this.periods);
            dest.writeString(this.productIcon);
            dest.writeString(this.productName);
            dest.writeString(this.auditDesc);
            dest.writeString(this.applyCount);
            dest.writeString(this.productDescription);
            dest.writeString(this.range);
            dest.writeString(this.updateDate);
            dest.writeTypedList(this.marks);
        }

        protected ProductBean(Parcel in) {
            this.amountDown = in.readDouble();
            this.amountUp = in.readDouble();
            this.businessId = in.readString();
            this.applicationCondition = in.readString();
            this.creationDate = in.readString();
            this.dayReat = in.readString();
            this.directUrl = in.readString();
            this.enable = in.readString();
            this.estimatedAmount = in.readDouble();
            this.flag = in.readString();
            this.headline = in.readString();
            this.id = in.readString();
            this.isSelf = in.readString();
            this.payEnable = in.readString();
            this.unit = in.readString();
            this.period = in.readInt();
            this.periods = in.readString();
            this.productIcon = in.readString();
            this.productName = in.readString();
            this.auditDesc = in.readString();
            this.applyCount = in.readString();
            this.productDescription = in.readString();
            this.range = in.readString();
            this.updateDate = in.readString();
            this.marks = in.createTypedArrayList(MarksBean.CREATOR);
        }

        public static final Creator<ProductBean> CREATOR = new Creator<ProductBean>() {
            @Override
            public ProductBean createFromParcel(Parcel source) {
                return new ProductBean(source);
            }

            @Override
            public ProductBean[] newArray(int size) {
                return new ProductBean[size];
            }
        };
    }

    public DrainProductBean() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.device);
        dest.writeString(this.directUrl);
        dest.writeString(this.id);
        dest.writeInt(this.isDelete);
        dest.writeParcelable(this.product, flags);
        dest.writeString(this.productId);
        dest.writeInt(this.status);
        dest.writeInt(this.type);
        dest.writeString(this.url);
        dest.writeString(this.creationTime);
    }

    protected DrainProductBean(Parcel in) {
        this.device = in.readString();
        this.directUrl = in.readString();
        this.id = in.readString();
        this.isDelete = in.readInt();
        this.product = in.readParcelable(ProductBean.class.getClassLoader());
        this.productId = in.readString();
        this.status = in.readInt();
        this.type = in.readInt();
        this.url = in.readString();
        this.creationTime = in.readString();
    }

    public static final Creator<DrainProductBean> CREATOR = new Creator<DrainProductBean>() {
        @Override
        public DrainProductBean createFromParcel(Parcel source) {
            return new DrainProductBean(source);
        }

        @Override
        public DrainProductBean[] newArray(int size) {
            return new DrainProductBean[size];
        }
    };
}
